package com.clear.honghefinance.biz.modules.assist_calculate.enums;

import lombok.Getter;

/**
 * 辅助核算类别类型
 */
@Getter
public enum AssistCalculateCategoryLevelEnum {

    SYSTEM(0, "系统科目"),
    CUSTOM(1, "自定义科目");

    private final String message;
    private final Integer code;

    AssistCalculateCategoryLevelEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static String getByMessage(int code) {
        for (AssistCalculateCategoryLevelEnum ele : values()) {
            if (ele.getCode() == code) {
                return ele.getMessage();
            }
        }
        return null;
    }
}
